# coding: utf-8

# In [4]


from bexk_da_sdk import bexk_da_repo
import joblib
bexk_da_repo.load("MD:OT", "MD_FJ_YC_702217", "./smart_ca_housing_md.pkl")
# 加载模型
model = joblib.load("./smart_ca_housing_md.pkl")


# In [5]


import pandas as pd
def _predict(input_value):
    X_input = pd.DataFrame([input_value])
    # 预测
    prediction = model.predict(X_input)
    return prediction[0].tolist()[0]



# In [6]


print(_predict({
        "MEDINC": 2.3886,
        "HOUSE_AGE": 16.0,
        "AVE_ROOMS": 5.254716981132075,
        "AVE_BEDRMS": 1.1622641509433962,
        "AVE_OCCUP": 2.616981132075472,
        "LATITUDE": 39.37,
        "LONGITUDE": -121.24,
        "POPULATION": 1387.0
    }))


# In [ ]





